Skip to content

Commit

Permalink
fix: remove @rocket.chat/license from ddp-client deps (#31189)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Dec 8, 2023
1 parent 07d20cb commit c12f15d
Show file tree
Hide file tree
Showing 61 changed files with 92 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { buildVersionUpdateMessage } from '../../../../version-check/server/func
import { generateWorkspaceBearerHttpHeader } from '../getWorkspaceAccessToken';
import { supportedVersionsChooseLatest } from './supportedVersionsChooseLatest';

declare module '@rocket.chat/license' {
declare module '@rocket.chat/core-typings' {
interface ILicenseV3 {
supportedVersions?: SignedSupportedVersions;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/client/hooks/useShouldPreventAction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LicenseLimitKind } from '@rocket.chat/license';
import type { LicenseLimitKind } from '@rocket.chat/core-typings';

import { useLicense } from './useLicense';

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/client/lib/utils/isOverLicenseLimits.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LicenseLimitKind } from '@rocket.chat/license';
import type { LicenseLimitKind } from '@rocket.chat/core-typings';

type Limits = Record<
LicenseLimitKind,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { LicenseBehavior } from '@rocket.chat/core-typings';
import { Callout } from '@rocket.chat/fuselage';
import type { LicenseBehavior } from '@rocket.chat/license/src/definition/LicenseBehavior';
import { validateWarnLimit } from '@rocket.chat/license/src/validation/validateLimit';
import { ExternalLink } from '@rocket.chat/ui-client';
import React from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ILicenseV3 } from '@rocket.chat/license';
import type { ILicenseV3 } from '@rocket.chat/core-typings';
import type { ReactElement } from 'react';
import React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ILicenseV3 } from '@rocket.chat/core-typings';
import { Box, Icon, Skeleton } from '@rocket.chat/fuselage';
import type { ILicenseV3 } from '@rocket.chat/license';
import { ExternalLink } from '@rocket.chat/ui-client';
import type { ReactElement } from 'react';
import React from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ILicenseV3 } from '@rocket.chat/core-typings';
import { Box, Tag } from '@rocket.chat/fuselage';
import type { ILicenseV3 } from '@rocket.chat/license';
import { ExternalLink } from '@rocket.chat/ui-client';
import differenceInDays from 'date-fns/differenceInDays';
import type { ReactElement } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/ee/app/license/server/lib/getAppCount.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Apps } from '@rocket.chat/core-services';
import type { LicenseAppSources } from '@rocket.chat/license';
import type { LicenseAppSources } from '@rocket.chat/core-typings';

import { getInstallationSourceFromAppStorageItem } from '../../../../../lib/apps/getInstallationSourceFromAppStorageItem';

Expand Down
3 changes: 2 additions & 1 deletion apps/meteor/ee/app/license/server/license.internalService.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { ILicense } from '@rocket.chat/core-services';
import { api, ServiceClassInternal } from '@rocket.chat/core-services';
import { License, type LicenseModule } from '@rocket.chat/license';
import { type LicenseModule } from '@rocket.chat/core-typings';
import { License } from '@rocket.chat/license';

import { guestPermissions } from '../../authorization/lib/guestPermissions';
import { resetEnterprisePermissions } from '../../authorization/server/resetEnterprisePermissions';
Expand Down
3 changes: 2 additions & 1 deletion apps/meteor/ee/app/license/server/methods.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { License, type ILicenseTag, type LicenseModule } from '@rocket.chat/license';
import { type ILicenseTag, type LicenseModule } from '@rocket.chat/core-typings';
import { License } from '@rocket.chat/license';
import type { ServerMethods } from '@rocket.chat/ui-contexts';
import { check } from 'meteor/check';
import { Meteor } from 'meteor/meteor';
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/ee/app/license/server/startup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { api } from '@rocket.chat/core-services';
import type { LicenseLimitKind } from '@rocket.chat/license';
import type { LicenseLimitKind } from '@rocket.chat/core-typings';
import { License } from '@rocket.chat/license';
import { Subscriptions, Users, Settings, LivechatVisitors } from '@rocket.chat/models';
import { wrapExceptions } from '@rocket.chat/tools';
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/ee/app/settings/server/settings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ISetting, SettingValue } from '@rocket.chat/core-typings';
import { License, type LicenseModule } from '@rocket.chat/license';
import type { ISetting, SettingValue, LicenseModule } from '@rocket.chat/core-typings';
import { License } from '@rocket.chat/license';
import { Settings } from '@rocket.chat/models';
import { Meteor } from 'meteor/meteor';

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/ee/client/hooks/useHasLicenseModule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LicenseModule } from '@rocket.chat/license';
import type { LicenseModule } from '@rocket.chat/core-typings';

import { useLicenseBase } from '../../../client/hooks/useLicense';

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/ee/client/lib/onToggledFeature.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LicenseModule } from '@rocket.chat/license';
import type { LicenseModule } from '@rocket.chat/core-typings';
import { QueryObserver } from '@tanstack/react-query';

import { queryClient } from '../../../client/lib/queryClient';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { IAppStorageItem } from '@rocket.chat/apps-engine/server/storage';
import type { LicenseAppSources } from '@rocket.chat/license';
import type { LicenseAppSources } from '@rocket.chat/core-typings';

/**
* There have been reports of apps not being correctly migrated from versions prior to 6.0
Expand Down
2 changes: 1 addition & 1 deletion ee/packages/ddp-client/src/types/streams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import type {
ILivechatAgent,
IImportProgress,
IBanner,
LicenseLimitKind,
} from '@rocket.chat/core-typings';
import type { LicenseLimitKind } from '@rocket.chat/license';
import type * as UiKit from '@rocket.chat/ui-kit';

type ClientAction = 'inserted' | 'updated' | 'removed' | 'changed';
Expand Down
7 changes: 2 additions & 5 deletions ee/packages/license/src/MockedLicenseBuilder.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import type { ILicenseTag } from './definition/ILicenseTag';
import type { ILicenseV3 } from './definition/ILicenseV3';
import type { LicenseLimit } from './definition/LicenseLimit';
import type { LicenseModule } from './definition/LicenseModule';
import type { LicensePeriod, Timestamp } from './definition/LicensePeriod';
import type { ILicenseTag, ILicenseV3, LicenseLimit, LicenseModule, LicensePeriod, Timestamp } from '@rocket.chat/core-typings';

import { encrypt } from './token';

export class MockedLicenseBuilder {
Expand Down
3 changes: 2 additions & 1 deletion ee/packages/license/src/deprecated.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ILicenseV3, LicenseLimitKind } from './definition/ILicenseV3';
import type { ILicenseV3, LicenseLimitKind } from '@rocket.chat/core-typings';

import type { LicenseManager } from './license';
import { getModules } from './modules';
import { defaultLimits } from './validation/validateDefaultLimits';
Expand Down
3 changes: 2 additions & 1 deletion ee/packages/license/src/events/deprecated.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { LicenseModule } from '../definition/LicenseModule';
import type { LicenseModule } from '@rocket.chat/core-typings';

import type { LicenseManager } from '../license';
import { hasModule } from '../modules';

Expand Down
4 changes: 2 additions & 2 deletions ee/packages/license/src/events/emitter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { BehaviorWithContext } from '../definition/LicenseBehavior';
import type { LicenseModule } from '../definition/LicenseModule';
import type { BehaviorWithContext, LicenseModule } from '@rocket.chat/core-typings';

import type { LicenseManager } from '../license';
import { logger } from '../logger';

Expand Down
5 changes: 2 additions & 3 deletions ee/packages/license/src/events/listeners.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { LicenseLimitKind } from '../definition/ILicenseV3';
import type { BehaviorWithContext, LicenseBehavior } from '../definition/LicenseBehavior';
import type { LicenseModule } from '../definition/LicenseModule';
import type { LicenseLimitKind, LicenseModule, BehaviorWithContext, LicenseBehavior } from '@rocket.chat/core-typings';

import type { LicenseManager } from '../license';
import { hasModule } from '../modules';

Expand Down
3 changes: 2 additions & 1 deletion ee/packages/license/src/events/overwriteClassOnLicense.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { LicenseModule } from '../definition/LicenseModule';
import type { LicenseModule } from '@rocket.chat/core-typings';

import type { LicenseManager } from '../license';
import { onLicense } from './deprecated';

Expand Down
14 changes: 2 additions & 12 deletions ee/packages/license/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { LicenseLimitKind } from './definition/ILicenseV3';
import type { LicenseInfo } from './definition/LicenseInfo';
import type { LimitContext } from './definition/LimitContext';
import type { LicenseLimitKind, LicenseInfo, LimitContext } from '@rocket.chat/core-typings';

import { getAppsConfig, getMaxActiveUsers, getUnmodifiedLicenseAndModules } from './deprecated';
import { onLicense } from './events/deprecated';
import {
Expand Down Expand Up @@ -28,15 +27,6 @@ import { getCurrentValueForLicenseLimit, setLicenseLimitCounter } from './valida
import { validateFormat } from './validation/validateFormat';

export { DuplicatedLicenseError } from './errors/DuplicatedLicenseError';
export * from './definition/ILicenseTag';
export * from './definition/ILicenseV2';
export * from './definition/ILicenseV3';
export * from './definition/LicenseBehavior';
export * from './definition/LicenseInfo';
export * from './definition/LicenseLimit';
export * from './definition/LicenseModule';
export * from './definition/LicensePeriod';
export * from './definition/LimitContext';
export * from './MockedLicenseBuilder';

// eslint-disable-next-line @typescript-eslint/naming-convention
Expand Down
4 changes: 1 addition & 3 deletions ee/packages/license/src/isItemAllowed.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import type { LicenseLimitKind } from './definition/ILicenseV3';
import type { LicenseBehavior } from './definition/LicenseBehavior';
import type { LicenseValidationOptions } from './definition/LicenseValidationOptions';
import type { LicenseLimitKind, LicenseBehavior, LicenseValidationOptions } from '@rocket.chat/core-typings';

const isItemAllowed = <T>(item: T, allowList?: T[]): boolean => {
return !allowList || allowList.includes(item);
Expand Down
22 changes: 13 additions & 9 deletions ee/packages/license/src/license.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import type {
ILicenseTag,
LicenseEvents,
ILicenseV2,
ILicenseV3,
LicenseLimitKind,
BehaviorWithContext,
LicenseBehavior,
LicenseInfo,
LicenseModule,
LicenseValidationOptions,
LimitContext,
} from '@rocket.chat/core-typings';
import { Emitter } from '@rocket.chat/emitter';

import { type ILicenseTag } from './definition/ILicenseTag';
import type { ILicenseV2 } from './definition/ILicenseV2';
import type { ILicenseV3, LicenseLimitKind } from './definition/ILicenseV3';
import type { BehaviorWithContext, LicenseBehavior } from './definition/LicenseBehavior';
import type { LicenseInfo } from './definition/LicenseInfo';
import type { LicenseModule } from './definition/LicenseModule';
import type { LicenseValidationOptions } from './definition/LicenseValidationOptions';
import type { LimitContext } from './definition/LimitContext';
import type { LicenseEvents } from './definition/events';
import { getLicenseLimit } from './deprecated';
import { DuplicatedLicenseError } from './errors/DuplicatedLicenseError';
import { InvalidLicenseError } from './errors/InvalidLicenseError';
Expand Down
3 changes: 2 additions & 1 deletion ee/packages/license/src/modules.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { LicenseModule } from './definition/LicenseModule';
import type { LicenseModule } from '@rocket.chat/core-typings';

import { moduleRemoved, moduleValidated } from './events/emitter';
import type { LicenseManager } from './license';

Expand Down
3 changes: 2 additions & 1 deletion ee/packages/license/src/showLicense.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ILicenseV3 } from './definition/ILicenseV3';
import type { ILicenseV3 } from '@rocket.chat/core-typings';

import type { LicenseManager } from './license';
import { getModules } from './modules';

Expand Down
3 changes: 2 additions & 1 deletion ee/packages/license/src/tags.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ILicenseTag } from './definition/ILicenseTag';
import type { ILicenseTag } from '@rocket.chat/core-typings';

import { type LicenseManager } from './license';

export function addTag(this: LicenseManager, tag: ILicenseTag) {
Expand Down
3 changes: 1 addition & 2 deletions ee/packages/license/src/token.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import crypto from 'crypto';

import type { ILicenseV3 } from '@rocket.chat/core-typings';
import { verify, sign, getPairs } from '@rocket.chat/jwt';

import type { ILicenseV3 } from './definition/ILicenseV3';

const PUBLIC_LICENSE_KEY_V2 =
'LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQ0lqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUFxV1Nza2Q5LzZ6Ung4a3lQY2ljcwpiMzJ3Mnd4VnV3N3lCVDk2clEvOEQreU1lQ01POXdTU3BIYS85bkZ5d293RXRpZ3B0L3dyb1BOK1ZHU3didHdQCkZYQmVxRWxCbmRHRkFsODZlNStFbGlIOEt6L2hHbkNtSk5tWHB4RUsyUkUwM1g0SXhzWVg3RERCN010eC9pcXMKY2pCL091dlNCa2ppU2xlUzdibE5JVC9kQTdLNC9DSjNvaXUwMmJMNEV4Y2xDSGVwenFOTWVQM3dVWmdweE9uZgpOT3VkOElYWUs3M3pTY3VFOEUxNTdZd3B6Q0twVmFIWDdaSmY4UXVOc09PNVcvYUlqS2wzTDYyNjkrZUlPRXJHCndPTm1hSG56Zmc5RkxwSmh6Z3BPMzhhVm43NnZENUtLakJhaldza1krNGEyZ1NRbUtOZUZxYXFPb3p5RUZNMGUKY0ZXWlZWWjNMZWg0dkVNb1lWUHlJeng5Nng4ZjIveW1QbmhJdXZRdjV3TjRmeWVwYTdFWTVVQ2NwNzF6OGtmUAo0RmNVelBBMElEV3lNaWhYUi9HNlhnUVFaNEdiL3FCQmh2cnZpSkNGemZZRGNKZ0w3RmVnRllIUDNQR0wwN1FnCnZMZXZNSytpUVpQcnhyYnh5U3FkUE9rZ3VyS2pWclhUVXI0QTlUZ2lMeUlYNVVsSnEzRS9SVjdtZk9xWm5MVGEKU0NWWEhCaHVQbG5DR1pSMDFUb1RDZktoTUcxdTBDRm5MMisxNWhDOWZxT21XdjlRa2U0M3FsSjBQZ0YzVkovWAp1eC9tVHBuazlnbmJHOUpIK21mSDM5Um9GdlROaW5Zd1NNdll6dXRWT242OXNPemR3aERsYTkwbDNBQ2g0eENWCks3Sk9YK3VIa29OdTNnMmlWeGlaVU0wQ0F3RUFBUT09Ci0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQo=';

Expand Down
2 changes: 1 addition & 1 deletion ee/packages/license/src/v2/bundles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LicenseModule } from '../definition/LicenseModule';
import type { LicenseModule } from '@rocket.chat/core-typings';

interface IBundle {
[key: string]: LicenseModule[];
Expand Down
5 changes: 2 additions & 3 deletions ee/packages/license/src/v2/convertToV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
* Transform a License V2 into a V3 representation.
*/

import type { ILicenseV2 } from '../definition/ILicenseV2';
import type { ILicenseV3 } from '../definition/ILicenseV3';
import type { LicenseModule } from '../definition/LicenseModule';
import type { ILicenseV2, ILicenseV3, LicenseModule } from '@rocket.chat/core-typings';

import { isBundle, getBundleFromModule, getBundleModules } from './bundles';
import { getTagColor } from './getTagColor';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BehaviorWithContext, LicenseBehavior } from '../definition/LicenseBehavior';
import type { BehaviorWithContext, LicenseBehavior } from '@rocket.chat/core-typings';

export const filterBehaviorsResult = (result: BehaviorWithContext[], expectedBehaviors: LicenseBehavior[]) =>
result.filter(({ behavior }) => expectedBehaviors.includes(behavior));
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { LicenseLimitKind } from '../definition/ILicenseV3';
import type { LimitContext } from '../definition/LimitContext';
import type { LicenseLimitKind, LimitContext } from '@rocket.chat/core-typings';

import type { LicenseManager } from '../license';
import { logger } from '../logger';
import { applyPendingLicense, hasPendingLicense } from '../pendingLicense';
Expand Down
3 changes: 1 addition & 2 deletions ee/packages/license/src/validation/getModulesToDisable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { BehaviorWithContext, LicenseBehavior } from '../definition/LicenseBehavior';
import type { LicenseModule } from '../definition/LicenseModule';
import type { BehaviorWithContext, LicenseBehavior, LicenseModule } from '@rocket.chat/core-typings';

const filterValidationResult = (result: BehaviorWithContext[], expectedBehavior: LicenseBehavior) =>
result.filter(({ behavior }) => behavior === expectedBehavior) as BehaviorWithContext[];
Expand Down
5 changes: 1 addition & 4 deletions ee/packages/license/src/validation/getResultingBehavior.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import type { LicenseLimitKind } from '../definition/ILicenseV3';
import type { BehaviorWithContext } from '../definition/LicenseBehavior';
import type { LicenseLimit } from '../definition/LicenseLimit';
import type { LicensePeriod } from '../definition/LicensePeriod';
import type { LicenseLimitKind, BehaviorWithContext, LicenseLimit, LicensePeriod } from '@rocket.chat/core-typings';

export const getResultingBehavior = (
data: LicenseLimit | LicensePeriod | Partial<Omit<BehaviorWithContext, 'reason'>>,
Expand Down
2 changes: 1 addition & 1 deletion ee/packages/license/src/validation/isBehaviorsInResult.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BehaviorWithContext, LicenseBehavior } from '../definition/LicenseBehavior';
import type { BehaviorWithContext, LicenseBehavior } from '@rocket.chat/core-typings';

export const isBehaviorsInResult = (result: BehaviorWithContext[], expectedBehaviors: LicenseBehavior[]) =>
result.some(({ behavior }) => expectedBehaviors.includes(behavior));
2 changes: 1 addition & 1 deletion ee/packages/license/src/validation/logKind.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LicenseBehavior } from '../definition/LicenseBehavior';
import type { LicenseBehavior } from '@rocket.chat/core-typings';

export const logKind = (behavior: LicenseBehavior) => {
switch (behavior) {
Expand Down
5 changes: 2 additions & 3 deletions ee/packages/license/src/validation/runValidation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { ILicenseV3 } from '../definition/ILicenseV3';
import type { BehaviorWithContext } from '../definition/LicenseBehavior';
import type { LicenseValidationOptions } from '../definition/LicenseValidationOptions';
import type { ILicenseV3, BehaviorWithContext, LicenseValidationOptions } from '@rocket.chat/core-typings';

import type { LicenseManager } from '../license';
import { validateLicenseLimits } from './validateLicenseLimits';
import { validateLicensePeriods } from './validateLicensePeriods';
Expand Down
5 changes: 2 additions & 3 deletions ee/packages/license/src/validation/validateDefaultLimits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { BehaviorWithContext } from '../definition/LicenseBehavior';
import type { LicenseLimit } from '../definition/LicenseLimit';
import type { LicenseValidationOptions } from '../definition/LicenseValidationOptions';
import type { BehaviorWithContext, LicenseLimit, LicenseValidationOptions } from '@rocket.chat/core-typings';

import type { LicenseManager } from '../license';
import { validateLimits } from './validateLimits';

Expand Down
5 changes: 2 additions & 3 deletions ee/packages/license/src/validation/validateLicenseLimits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { ILicenseV3 } from '../definition/ILicenseV3';
import type { BehaviorWithContext } from '../definition/LicenseBehavior';
import type { LicenseValidationOptions } from '../definition/LicenseValidationOptions';
import type { ILicenseV3, BehaviorWithContext, LicenseValidationOptions } from '@rocket.chat/core-typings';

import type { LicenseManager } from '../license';
import { validateLimits } from './validateLimits';

Expand Down
6 changes: 2 additions & 4 deletions ee/packages/license/src/validation/validateLicensePeriods.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import type { ILicenseV3 } from '../definition/ILicenseV3';
import type { BehaviorWithContext } from '../definition/LicenseBehavior';
import type { Timestamp } from '../definition/LicensePeriod';
import type { LicenseValidationOptions } from '../definition/LicenseValidationOptions';
import type { ILicenseV3, BehaviorWithContext, Timestamp, LicenseValidationOptions } from '@rocket.chat/core-typings';

import { isBehaviorAllowed } from '../isItemAllowed';
import { logger } from '../logger';
import { getResultingBehavior } from './getResultingBehavior';
Expand Down
5 changes: 2 additions & 3 deletions ee/packages/license/src/validation/validateLicenseUrl.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import crypto from 'crypto';

import type { ILicenseV3 } from '../definition/ILicenseV3';
import type { BehaviorWithContext } from '../definition/LicenseBehavior';
import type { LicenseValidationOptions } from '../definition/LicenseValidationOptions';
import type { ILicenseV3, BehaviorWithContext, LicenseValidationOptions } from '@rocket.chat/core-typings';

import { isBehaviorAllowed } from '../isItemAllowed';
import type { LicenseManager } from '../license';
import { logger } from '../logger';
Expand Down
2 changes: 1 addition & 1 deletion ee/packages/license/src/validation/validateLimit.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LicenseBehavior } from '../definition/LicenseBehavior';
import type { LicenseBehavior } from '@rocket.chat/core-typings';

/**
* The difference between validateLimit and validateWarnLimit is that the first one
Expand Down
5 changes: 2 additions & 3 deletions ee/packages/license/src/validation/validateLimits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { ILicenseV3, LicenseLimitKind } from '../definition/ILicenseV3';
import type { BehaviorWithContext } from '../definition/LicenseBehavior';
import type { LicenseValidationOptions } from '../definition/LicenseValidationOptions';
import type { ILicenseV3, LicenseLimitKind, BehaviorWithContext, LicenseValidationOptions } from '@rocket.chat/core-typings';

import { isLimitAllowed, isBehaviorAllowed } from '../isItemAllowed';
import type { LicenseManager } from '../license';
import { logger } from '../logger';
Expand Down
2 changes: 1 addition & 1 deletion packages/core-services/src/events/Events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import type {
ILivechatAgent,
IBanner,
ILivechatVisitor,
LicenseLimitKind,
} from '@rocket.chat/core-typings';
import type { LicenseLimitKind } from '@rocket.chat/license';
import type * as UiKit from '@rocket.chat/ui-kit';

import type { AutoUpdateRecord } from '../types/IMeteor';
Expand Down
1 change: 1 addition & 0 deletions packages/core-typings/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export * from './IRocketChatAssets';
export * from './IPushToken';
export * from './IPushNotificationConfig';
export * from './SlashCommands';
export * from './license';

export * from './IUserDataFile';
export * from './IUserSession';
Expand Down
Loading

0 comments on commit c12f15d

Please sign in to comment.