Skip to content

Commit

Permalink
fix(shared,testing): remove @clerk/types dependency from shared packa…
Browse files Browse the repository at this point in the history
…ge (#6382)
  • Loading branch information
ChmaraX authored Aug 23, 2024
1 parent 01b2ac8 commit 659f4d3
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .source
1 change: 0 additions & 1 deletion libs/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"class-validator": "0.14.0"
},
"devDependencies": {
"@clerk/types": "^4.6.1",
"@types/bluebird": "^3.5.24",
"@types/jest": "29.5.2",
"jest": "^27.1.0",
Expand Down
12 changes: 0 additions & 12 deletions libs/shared/src/types/auth/auth.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { JwtPayload } from '@clerk/types';
import { SignUpOriginEnum } from '../analytics';

export interface IJwtClaims {
Expand All @@ -14,17 +13,6 @@ export interface IJwtClaims {
scheme: ApiAuthSchemeEnum.BEARER | ApiAuthSchemeEnum.API_KEY;
}

// JWT payload + custom claims
export type ClerkJwtPayload = JwtPayload & {
_id: string;
email: string;
lastName: string;
firstName: string;
profilePicture: string;
externalId?: string;
externalOrgId?: string;
};

export type UserSessionData = IJwtClaims & { environmentId: string };

export enum ApiAuthSchemeEnum {
Expand Down
11 changes: 11 additions & 0 deletions libs/testing/src/ee/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { JwtPayload } from '@clerk/types';

export type ClerkJwtPayload = JwtPayload & {
_id: string;
email: string;
lastName: string;
firstName: string;
profilePicture: string;
externalId?: string;
externalOrgId?: string;
};
2 changes: 1 addition & 1 deletion libs/testing/src/user.session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
JobTopicNameEnum,
StepTypeEnum,
TriggerRecipientsPayload,
ClerkJwtPayload,
isClerkEnabled,
} from '@novu/shared';
import {
Expand All @@ -39,6 +38,7 @@ import { JobsService } from './jobs.service';
import { EEUserService } from './ee/ee.user.service';
import { EEOrganizationService } from './ee/ee.organization.service';
import { TEST_USER_PASSWORD } from './constants';
import { ClerkJwtPayload } from './ee/types';

type UserSessionOptions = {
noOrganization?: boolean;
Expand Down
155 changes: 72 additions & 83 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 659f4d3

Please sign in to comment.