mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
chore: rename fundamentals to base (#9119)
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
defineRuntimeConfig,
|
||||
defineStartupConfig,
|
||||
ModuleConfig,
|
||||
} from '../../fundamentals/config';
|
||||
} from '../../base/config';
|
||||
|
||||
export interface PaymentStartupConfig {
|
||||
stripe?: {
|
||||
|
||||
@@ -6,8 +6,8 @@ import { EventEmitter2 } from '@nestjs/event-emitter';
|
||||
import type { Request } from 'express';
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { Config, InternalServerError } from '../../base';
|
||||
import { Public } from '../../core/auth';
|
||||
import { Config, InternalServerError } from '../../fundamentals';
|
||||
|
||||
@Controller('/api/stripe')
|
||||
export class StripeWebhookController {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { OnEvent } from '@nestjs/event-emitter';
|
||||
import { Cron, CronExpression } from '@nestjs/schedule';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
import { EventEmitter, type EventPayload } from '../../fundamentals';
|
||||
import { EventEmitter, type EventPayload } from '../../base';
|
||||
import {
|
||||
SubscriptionPlan,
|
||||
SubscriptionRecurring,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { PrismaClient, UserStripeCustomer } from '@prisma/client';
|
||||
import Stripe from 'stripe';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { UserNotFound } from '../../../fundamentals';
|
||||
import { UserNotFound } from '../../../base';
|
||||
import { ScheduleManager } from '../schedule';
|
||||
import {
|
||||
encodeLookupKey,
|
||||
|
||||
@@ -4,10 +4,6 @@ import { omit, pick } from 'lodash-es';
|
||||
import Stripe from 'stripe';
|
||||
import { z } from 'zod';
|
||||
|
||||
import {
|
||||
EarlyAccessType,
|
||||
FeatureManagementService,
|
||||
} from '../../../core/features';
|
||||
import {
|
||||
Config,
|
||||
EventEmitter,
|
||||
@@ -16,7 +12,11 @@ import {
|
||||
SubscriptionAlreadyExists,
|
||||
SubscriptionPlanNotFound,
|
||||
URLHelper,
|
||||
} from '../../../fundamentals';
|
||||
} from '../../../base';
|
||||
import {
|
||||
EarlyAccessType,
|
||||
FeatureManagementService,
|
||||
} from '../../../core/features';
|
||||
import {
|
||||
CouponType,
|
||||
KnownStripeInvoice,
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
SubscriptionAlreadyExists,
|
||||
SubscriptionPlanNotFound,
|
||||
URLHelper,
|
||||
} from '../../../fundamentals';
|
||||
} from '../../../base';
|
||||
import {
|
||||
KnownStripeInvoice,
|
||||
KnownStripePrice,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
|
||||
import type { EventPayload } from '../../base';
|
||||
import { PermissionService } from '../../core/permission';
|
||||
import { QuotaManagementService, QuotaType } from '../../core/quota';
|
||||
import type { EventPayload } from '../../fundamentals';
|
||||
|
||||
@Injectable()
|
||||
export class TeamQuotaOverride {
|
||||
|
||||
@@ -18,15 +18,15 @@ import { GraphQLJSONObject } from 'graphql-scalars';
|
||||
import { groupBy } from 'lodash-es';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { CurrentUser, Public } from '../../core/auth';
|
||||
import { Permission, PermissionService } from '../../core/permission';
|
||||
import { UserType } from '../../core/user';
|
||||
import { WorkspaceType } from '../../core/workspaces';
|
||||
import {
|
||||
AccessDenied,
|
||||
FailedToCheckout,
|
||||
WorkspaceIdRequiredToUpdateTeamSubscription,
|
||||
} from '../../fundamentals';
|
||||
} from '../../base';
|
||||
import { CurrentUser, Public } from '../../core/auth';
|
||||
import { Permission, PermissionService } from '../../core/permission';
|
||||
import { UserType } from '../../core/user';
|
||||
import { WorkspaceType } from '../../core/workspaces';
|
||||
import { Invoice, Subscription, WorkspaceSubscriptionManager } from './manager';
|
||||
import { CheckoutParams, SubscriptionService } from './service';
|
||||
import {
|
||||
|
||||
@@ -4,9 +4,6 @@ import { PrismaClient } from '@prisma/client';
|
||||
import Stripe from 'stripe';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { CurrentUser } from '../../core/auth';
|
||||
import { FeatureManagementService } from '../../core/features';
|
||||
import { UserService } from '../../core/user';
|
||||
import {
|
||||
ActionForbidden,
|
||||
CantUpdateOnetimePaymentSubscription,
|
||||
@@ -25,7 +22,10 @@ import {
|
||||
SubscriptionPlanNotFound,
|
||||
UnsupportedSubscriptionPlan,
|
||||
UserNotFound,
|
||||
} from '../../fundamentals';
|
||||
} from '../../base';
|
||||
import { CurrentUser } from '../../core/auth';
|
||||
import { FeatureManagementService } from '../../core/features';
|
||||
import { UserService } from '../../core/user';
|
||||
import {
|
||||
CheckoutParams,
|
||||
Invoice,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { FactoryProvider } from '@nestjs/common';
|
||||
import { omit } from 'lodash-es';
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import { Config } from '../../fundamentals';
|
||||
import { Config } from '../../base';
|
||||
|
||||
export const StripeProvider: FactoryProvider = {
|
||||
provide: Stripe,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { User, Workspace } from '@prisma/client';
|
||||
import Stripe from 'stripe';
|
||||
|
||||
import type { Payload } from '../../fundamentals/event/def';
|
||||
import type { Payload } from '../../base/event/def';
|
||||
|
||||
export enum SubscriptionRecurring {
|
||||
Monthly = 'monthly',
|
||||
@@ -49,7 +49,7 @@ export enum CouponType {
|
||||
ProEarlyAccessAIOneYearFree = 'ai_pro_ea_one_year_free',
|
||||
}
|
||||
|
||||
declare module '../../fundamentals/event/def' {
|
||||
declare module '../../base/event/def' {
|
||||
interface UserEvents {
|
||||
subscription: {
|
||||
activated: Payload<{
|
||||
|
||||
Reference in New Issue
Block a user