Update billing to EE (#10060)
Doesn't make sense to have billing under GPL since it's only used for our cloud and not by self-hosters
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import {
|
||||
Controller,
|
||||
Headers,
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { UseGuards } from '@nestjs/common';
|
||||
import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
import chalk from 'chalk';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
import { Command } from 'nest-commander';
|
||||
|
||||
@ -1 +1,3 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export const BILLING_FEATURE_USED = 'BILLING_FEATURE_USED';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { SubscriptionInterval } from 'src/engine/core-modules/billing/enums/billing-subscription-interval.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { BillingPriceTierDTO } from 'src/engine/core-modules/billing/dtos/billing-price-tier.dto';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
@ObjectType()
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { createUnionType } from '@nestjs/graphql';
|
||||
|
||||
import { BillingPriceLicensedDTO } from 'src/engine/core-modules/billing/dtos/billing-price-licensed.dto';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { BillingPriceLicensedDTO } from 'src/engine/core-modules/billing/dtos/billing-price-licensed.dto';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { Min } from 'class-validator';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { ArgsType, Field } from '@nestjs/graphql';
|
||||
|
||||
import {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { ArgsType, Field } from '@nestjs/graphql';
|
||||
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { ArgsType, Field } from '@nestjs/graphql';
|
||||
|
||||
import { IsOptional, IsString } from 'class-validator';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { BillingProductDTO } from 'src/engine/core-modules/billing/dtos/billing-product.dto';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, Int, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { BillingProductPriceDTO } from 'src/engine/core-modules/billing/dtos/billing-product-price.dto';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
@ObjectType()
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
@ObjectType()
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { IDField } from '@ptc-org/nestjs-query-graphql';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType } from '@nestjs/graphql';
|
||||
|
||||
import { IDField } from '@ptc-org/nestjs-query-graphql';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
import {
|
||||
Column,
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field } from '@nestjs/graphql';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
import {
|
||||
Column,
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Field, ObjectType, registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
import { IDField } from '@ptc-org/nestjs-query-graphql';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum AvailableProduct {
|
||||
BasePlan = 'base-plan',
|
||||
}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum BillingEntitlementKey {
|
||||
SSO = 'SSO',
|
||||
}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum BillingMeterEventName {
|
||||
WORKFLOW_NODE_RUN = 'WORKFLOW_NODE_RUN',
|
||||
}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum BillingMeterEventTimeWindow {
|
||||
DAY = 'DAY',
|
||||
HOUR = 'HOUR',
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum BillingMeterStatus {
|
||||
ACTIVE = 'ACTIVE',
|
||||
INACTIVE = 'INACTIVE',
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
export enum BillingPlanKey {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum BillingPriceBillingScheme {
|
||||
PER_UNIT = 'PER_UNIT',
|
||||
TIERED = 'TIERED',
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum BillingPriceTaxBehavior {
|
||||
EXCLUSIVE = 'EXCLUSIVE',
|
||||
INCLUSIVE = 'INCLUSIVE',
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
export enum BillingPriceTiersMode {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum BillingPriceType {
|
||||
ONE_TIME = 'ONE_TIME',
|
||||
RECURRING = 'RECURRING',
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum BillingSubscriptionCollectionMethod {
|
||||
CHARGE_AUTOMATICALLY = 'CHARGE_AUTOMATICALLY',
|
||||
SEND_INVOICE = 'SEND_INVOICE',
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum SubscriptionInterval {
|
||||
Day = 'day',
|
||||
Month = 'month',
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum SubscriptionStatus {
|
||||
Active = 'active',
|
||||
Canceled = 'canceled',
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum BillingUsageType {
|
||||
METERED = 'METERED',
|
||||
LICENSED = 'LICENSED',
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
export enum BillingWebhookEvent {
|
||||
CUSTOMER_SUBSCRIPTION_CREATED = 'customer.subscription.created',
|
||||
CUSTOMER_SUBSCRIPTION_UPDATED = 'customer.subscription.updated',
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { ArgumentsHost, Catch, ExceptionFilter } from '@nestjs/common';
|
||||
|
||||
import { Response } from 'express';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Logger, Scope } from '@nestjs/common';
|
||||
|
||||
import { BillingSubscriptionService } from 'src/engine/core-modules/billing/services/billing-subscription.service';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { OnCustomBatchEvent } from 'src/engine/api/graphql/graphql-query-runner/decorators/on-custom-batch-event.decorator';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import { OnDatabaseBatchEvent } from 'src/engine/api/graphql/graphql-query-runner/decorators/on-database-batch-event.decorator';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
@ -14,11 +16,11 @@ import { StripeBillingPortalService } from 'src/engine/core-modules/billing/stri
|
||||
import { StripeCheckoutService } from 'src/engine/core-modules/billing/stripe/services/stripe-checkout.service';
|
||||
import { BillingGetPricesPerPlanResult } from 'src/engine/core-modules/billing/types/billing-get-prices-per-plan-result.type';
|
||||
import { BillingPortalCheckoutSessionParameters } from 'src/engine/core-modules/billing/types/billing-portal-checkout-session-parameters.type';
|
||||
import { DomainManagerService } from 'src/engine/core-modules/domain-manager/services/domain-manager.service';
|
||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
||||
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
import { DomainManagerService } from 'src/engine/core-modules/domain-manager/services/domain-manager.service';
|
||||
import { assert } from 'src/utils/assert';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
export class StripeSDKMock {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { StripeSDKService } from 'src/engine/core-modules/billing/stripe/stripe-sdk/services/stripe-sdk.service';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Module } from '@nestjs/common';
|
||||
|
||||
import { StripeBillingMeterEventService } from 'src/engine/core-modules/billing/stripe/services/stripe-billing-meter-event.service';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { BillingProduct } from 'src/engine/core-modules/billing/entities/billing-product.entity';
|
||||
import { BillingPlanKey } from 'src/engine/core-modules/billing/enums/billing-plan-key.enum';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { BillingPrice } from 'src/engine/core-modules/billing/entities/billing-price.entity';
|
||||
|
||||
export type BillingGetPricesPerPlanResult = {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { BillingPlanKey } from 'src/engine/core-modules/billing/enums/billing-plan-key.enum';
|
||||
import { BillingGetPricesPerPlanResult } from 'src/engine/core-modules/billing/types/billing-get-prices-per-plan-result.type';
|
||||
import { User } from 'src/engine/core-modules/user/user.entity';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { BillingPlanKey } from 'src/engine/core-modules/billing/enums/billing-plan-key.enum';
|
||||
import { BillingUsageType } from 'src/engine/core-modules/billing/enums/billing-usage-type.enum';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { NonNegative } from 'type-fest';
|
||||
|
||||
import { BillingMeterEventName } from 'src/engine/core-modules/billing/enums/billing-meter-event-names';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { BillingPlanKey } from 'src/engine/core-modules/billing/enums/billing-plan-key.enum';
|
||||
import { BillingPriceTiersMode } from 'src/engine/core-modules/billing/enums/billing-price-tiers-mode.enum';
|
||||
import { SubscriptionInterval } from 'src/engine/core-modules/billing/enums/billing-subscription-interval.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { BillingPlanKey } from 'src/engine/core-modules/billing/enums/billing-plan-key.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { BillingMeterEventTimeWindow } from 'src/engine/core-modules/billing/enums/billing-meter-event-time-window.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { BillingPriceBillingScheme } from 'src/engine/core-modules/billing/enums/billing-price-billing-scheme.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { transformStripeProductToDatabaseProduct } from 'src/engine/core-modules/billing/utils/transform-stripe-product-to-database-product.util';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { BillingPriceLicensedDTO } from 'src/engine/core-modules/billing/dtos/billing-price-licensed.dto';
|
||||
import { BillingPriceMeteredDTO } from 'src/engine/core-modules/billing/dtos/billing-price-metered.dto';
|
||||
import { BillingPlanOutput } from 'src/engine/core-modules/billing/dtos/outputs/billing-plan.output';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { BillingPlanKey } from 'src/engine/core-modules/billing/enums/billing-plan-key.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { BillingMeterEventTimeWindow } from 'src/engine/core-modules/billing/enums/billing-meter-event-time-window.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { BillingPriceBillingScheme } from 'src/engine/core-modules/billing/enums/billing-price-billing-scheme.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
export const transformStripeProductToDatabaseProduct = (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { BillingEntitlementKey } from 'src/engine/core-modules/billing/enums/billing-entitlement-key.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { BillingPriceBillingScheme } from 'src/engine/core-modules/billing/enums/billing-price-billing-scheme.enum';
|
||||
import { BillingPriceTaxBehavior } from 'src/engine/core-modules/billing/enums/billing-price-tax-behavior.enum';
|
||||
import { BillingPriceTiersMode } from 'src/engine/core-modules/billing/enums/billing-price-tiers-mode.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { transformStripeProductEventToDatabaseProduct } from 'src/engine/core-modules/billing/webhooks/utils/transform-stripe-product-event-to-database-product.util';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { transformStripeSubscriptionEventToDatabaseCustomer } from 'src/engine/core-modules/billing/webhooks/utils/transform-stripe-subscription-event-to-database-customer.util';
|
||||
describe('transformStripeSubscriptionEventToDatabaseCustomer', () => {
|
||||
const mockWorkspaceId = 'workspace_123';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import { BillingSubscriptionCollectionMethod } from 'src/engine/core-modules/billing/enums/billing-subscription-collection-method.enum';
|
||||
import { SubscriptionStatus } from 'src/engine/core-modules/billing/enums/billing-subscription-status.enum';
|
||||
import { transformStripeSubscriptionEventToDatabaseSubscription } from 'src/engine/core-modules/billing/webhooks/utils/transform-stripe-subscription-event-to-database-subscription.util';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { BillingEntitlementKey } from 'src/engine/core-modules/billing/enums/billing-entitlement-key.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { BillingPriceBillingScheme } from 'src/engine/core-modules/billing/enums/billing-price-billing-scheme.enum';
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
export const transformStripeProductEventToDatabaseProduct = (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
export const transformStripeSubscriptionEventToDatabaseCustomer = (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
export const transformStripeSubscriptionEventToDatabaseSubscriptionItem = (
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* @license Enterprise */
|
||||
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { BillingSubscriptionCollectionMethod } from 'src/engine/core-modules/billing/enums/billing-subscription-collection-method.enum';
|
||||
|
||||
Reference in New Issue
Block a user